package com.butnet.myframe.creator;

/**
 * 字段信息
 * @author Administrator
 *
 */
public class FieldInfo {
	/**
	 * 类型
	 */
	private String type;
	/**
	 * 字段名
	 */
	private String name;
	/**
	 * set方法名
	 */
	private String set;
	/**
	 * get方法名
	 */
	private String get;
	/**
	 * 注释
	 */
	private String commet;

	public FieldInfo() {
	}

	public FieldInfo(String type, String name) {
		this.type = type;
		this.name = (name.charAt(0)+"").toLowerCase()+name.substring(1);
		this.set = "set" + (name.charAt(0) + "").toUpperCase()
				+ name.substring(1);
		this.get = "get" + (name.charAt(0) + "").toUpperCase()
				+ name.substring(1);
	}

	public FieldInfo(String type, String name, String commet) {
		this.type = type;
		this.name = (name.charAt(0)+"").toLowerCase()+name.substring(1);
		this.set = "set" + (name.charAt(0) + "").toUpperCase()
				+ name.substring(1);
		this.get = "get" + (name.charAt(0) + "").toUpperCase()
				+ name.substring(1);
		this.commet = commet;
	}

	public String getCommet() {
		return commet;
	}

	public void setCommet(String commet) {
		this.commet = commet;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSet() {
		return set;
	}

	public void setSet(String set) {
		this.set = set;
	}

	public String getGet() {
		return get;
	}

	public void setGet(String get) {
		this.get = get;
	}
}
